#!/bin/env ruby
# encoding: utf-8
require_relative '../spec/spec_helper'
require_relative '../spec/commons/user_auth'
require_relative '../spec/commons/check_page'
require_relative '../spec/commons/user_registration_func'

describe 'Sign up from company page' do
  describe 'registration 2: from company home page as Mentee' do
    before (:all) { 
    browser.elements.each do |elem|
      STDERR.puts elem.tag_name
    end     
      goto 'https://mutualforce.7bits.it/Red_Klin/home.html'
      a(href: "#tabs-2").click
      browser.wait(5)
      select_list(name: "selectedRole", id: "selectedRole").select "Mentee"
    }
    include_context "User registration"
  end  
    
  describe 'registration 2: from company home page as Mentor' do
    before (:all) {
      goto 'https://mutualforce.7bits.it/Red_Klin/home.html'
      a(href: "#tabs-2").click
      browser.wait(5)
      select_list(name: "selectedRole", id: "selectedRole").select "Mentor"      
    }
    include_context "User registration"
  end
end